package org.jeecg.modules.charge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.charge.entity.ChargeInvoiceMangroup;
import org.jeecg.modules.charge.entity.ChargeInvoiceMangroupPosition;
import org.jeecg.modules.charge.entity.ChargeInvoiceMangroupType;
import org.jeecg.modules.charge.entity.ChargeInvoiceManpeople;
import org.jeecg.modules.charge.vo.CheckOutMangroup;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 票据组
 * @Author: jeecg-boot
 * @Date:   2019-07-08
 * @Version: V1.0
 */
public interface IChargeInvoiceMangroupService extends IService<ChargeInvoiceMangroup> {

	/**
	 * 添加一对多
	 * 
	 */
	public void saveMain(ChargeInvoiceMangroup chargeInvoiceMangroup,List<ChargeInvoiceMangroupType> chargeInvoiceMangroupTypeList,List<ChargeInvoiceMangroupPosition> chargeInvoiceMangroupPositionList,List<ChargeInvoiceManpeople> chargeInvoiceManpeopleList) ;
	
	/**
	 * 修改一对多
	 * 
	 */
	public void updateMain(ChargeInvoiceMangroup chargeInvoiceMangroup,List<ChargeInvoiceMangroupType> chargeInvoiceMangroupTypeList,List<ChargeInvoiceMangroupPosition> chargeInvoiceMangroupPositionList,List<ChargeInvoiceManpeople> chargeInvoiceManpeopleList);
	
	/**
	 * 删除一对多
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 查询当前登陆用户是否拥有开票权限
	 * @param userName
	 * @return
	 */
	public List<ChargeInvoiceMangroup> selectByLimit(String userId);

	/**
	 *  类型重复检查SQL
	 * @return
	 */
	public Long duplicateCheckCountSql(CheckOutMangroup checkOutMangroup);
	public Long duplicateCheckCountSqlNoDataId(CheckOutMangroup checkOutMangroup);

	/**
	 *  岗位重复检查SQL
	 * @return
	 */
	public Long duplicateCheckPositionCountSql(CheckOutMangroup checkOutMangroup);
	public Long duplicateCheckPositionCountSqlNoDataId(CheckOutMangroup checkOutMangroup,String[] offId);

	/**
	 *  人员重复检查SQL
	 * @return
	 */
	public Long duplicateCheckPeopleCountSql(CheckOutMangroup checkOutMangroup);
	public Long duplicateCheckPeopleCountSqlNoDataId(CheckOutMangroup checkOutMangroup,String[] userId);
	
}
